import java.net.*;
import java.io.*;

public class HttpDnsTest {

	public void test() throws Exception {
		
	String request = "http://kftest3.sqa.cm4.tbsite.net:8567/getip.json?host_key=r1.test1.com";
	URL url = new URL(request);
	HttpURLConnection HttpURLConnection = (HttpURLConnection) url.openConnection();
	HttpURLConnection.connect();
	
    BufferedReader reader = new BufferedReader(new InputStreamReader(
    		HttpURLConnection.getInputStream()));
    System.out.println("=============================");
    System.out.println("Contents of get request");
    System.out.println("=============================");
    String lines;
    String result = "";
    while ((lines = reader.readLine()) != null) {
        result += lines; 
    }
    reader.close();
    HttpURLConnection.disconnect();
    System.out.println(result);
	}
}
